package org.hook.showcase.pattern.observer;

import org.hook.showcase.pattern.observer.impl.CurrentConditionDisplay;
import org.hook.showcase.pattern.observer.impl.CurrentConditionDisplay2;
import org.hook.showcase.pattern.observer.impl.WeatherData;
import org.hook.showcase.pattern.observer.impl.WeatherData2;

public class ObserverPatternCase {

	public static void main(String[] args) {
		WeatherData weatherData = new WeatherData();
		new CurrentConditionDisplay(weatherData);
		weatherData.setMeasurements(1, 2, 1.1f);
		weatherData.setMeasurements(2, 3, 2.1f);
		weatherData.setMeasurements(4, 5, 3.1f);
		System.out.println("----------------");
		WeatherData2 weatherData2 = new WeatherData2();
		new CurrentConditionDisplay2(weatherData2);
		weatherData2.setMeasurements(1, 2, 1.1f);
		weatherData2.setMeasurements(2, 3, 2.1f);
		weatherData2.setMeasurements(4, 5, 3.1f);
	}
}
